package com.ruoyi.pay.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.pay.entity.OrderInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    @Select("SELECT * FROM PAY_order_info WHERE TIMESTAMPDIFF(MINUTE, create_time, NOW()) > #{timeout} AND order_status = #{status}")
    List<OrderInfo> queryTimeOutOrderInfo(@Param("status") String status,@Param("timeout") int timeout);
}
